package com.skplanet.oneplusonewindow.moim;

import java.io.ByteArrayOutputStream;

import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;

public class user {

	private String name;
	private int	miom_id;
	private Bitmap profileImg;
	
	private static user instance = new user();
	
	private user() {
		
	}
	
	public static user getInstance() {
		return instance;
	}
	public void setname(String str) {
		name = str;
	}
	public String getName() {
		return name;
	}

	public int getMiom_id() {
		return miom_id;
	}

	public void setMiom_id(int miom_id) {
		this.miom_id = miom_id;
	}
	public void setProfileImg(Bitmap img) {
		this.profileImg = img;
	}
	public Bitmap getProfileImg() {
		return this.profileImg;
	}
	
	public byte[] getProfileImgByteArray() {
		ByteArrayOutputStream stream = new ByteArrayOutputStream() ;  
        this.profileImg.compress( CompressFormat.JPEG, 100, stream) ;  
        byte[] byteArray = stream.toByteArray() ;  
        return byteArray ; 
	}
}
